Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

Surrogate (version 3.3.3)

plot Causal-Inference BinBin: Plots the (Meta-Analytic) Individual Causal Association and related metrics when S and T are binary outcomes

Description

This function provides a plot that displays the frequencies, percentages, cumulative percentages or densities of the individual causal association (ICA; RH2 or RH), and/or the odds ratios for S and T (θS and θT).

Usage

# S3 method for ICA.BinBin
plot(x, R2_H=TRUE, R_H=FALSE, Theta_T=FALSE, 
Theta_S=FALSE, Type="Density", Labels=FALSE, Xlab.R2_H, 
Main.R2_H, Xlab.R_H, Main.R_H, Xlab.Theta_S, Main.Theta_S, Xlab.Theta_T, 
Main.Theta_T, Cex.Legend=1, Cex.Position="topright",  
col, Par=par(oma=c(0, 0, 0, 0), mar=c(5.1, 4.1, 4.1, 2.1)), ylim, ...)

Arguments

x

An object of class ICA.BinBin. See ICA.BinBin.

R2_H

Logical. When R2_H=TRUE, a plot of the RH2 is provided. Default TRUE.

R_H

Logical. When R_H=TRUE, a plot of the RH is provided. Default FALSE.

Theta_T

Logical. When Theta_T=TRUE, a plot of the θT is provided. Default FALSE.

Theta_S

Logical. When Theta_S=TRUE, a plot of the θS is provided. Default FALSE.

Type

The type of plot that is produced. When Type="Freq" or Type="Percent", the Y-axis shows frequencies or percentages of RH2, RH, θT, or θS. When Type="CumPerc", the Y-axis shows cumulative percentages. When Type="Density", the density is shown. When the fitted object of class ICA.BinBin was obtained using a general analysis (i.e., using the Monotonicity=c("General") argument in the function call), sperate plots are provided for the different monotonicity scenarios. Default "Density".

Labels

Logical. When Labels=TRUE, the percentage of RH2, RH, θT, or θS values that are equal to or larger than the midpoint value of each of the bins are displayed (on top of each bin). Default FALSE.

Xlab.R2_H

The legend of the X-axis of the RH2 plot.

Main.R2_H

The title of the RH2 plot.

Xlab.R_H

The legend of the X-axis of the RH plot.

Main.R_H

The title of the RH plot.

Xlab.Theta_S

The legend of the X-axis of the θS plot.

Main.Theta_S

The title of the θS plot.

Xlab.Theta_T

The legend of the X-axis of the θT plot.

Main.Theta_T

The title of the θT plot.

Cex.Legend

The size of the legend when Type="All.Densities" is used. Default Cex.Legend=1.

Cex.Position

The position of the legend, Cex.Position="topright" or Cex.Position="topleft". Default Cex.Position="topright".

col

The color of the bins. Default col <- c(8).

Par

Graphical parameters for the plot. Default par(oma=c(0, 0, 0, 0), mar=c(5.1, 4.1, 4.1, 2.1)).

ylim

The (min, max) values for the Y-axis

.

...

Extra graphical parameters to be passed to hist().

Author

Wim Van der Elst, Ariel Alonso, & Geert Molenberghs

References

Alonso, A., Van der Elst, W., Molenberghs, G., Buyse, M., & Burzykowski, T. (submitted). A causal-inference approach for the validation of surrogate endpoints based on information theory and sensitivity analysis.

See Also

ICA.BinBin

Examples

Run this code
# Compute R2_H given the marginals, 
# assuming monotonicity for S and T and grids
# pi_0111=seq(0, 1, by=.001) and 
# pi_1100=seq(0, 1, by=.001)
ICA <- ICA.BinBin.Grid.Sample(pi1_1_=0.261, pi1_0_=0.285, 
pi_1_1=0.637, pi_1_0=0.078, pi0_1_=0.134, pi_0_1=0.127,  
Monotonicity=c("General"), M=2500, Seed=1)
           
# Plot the results (density of R2_H):
plot(ICA, Type="Density", R2_H=TRUE, R_H=FALSE, 
Theta_T=FALSE, Theta_S=FALSE)

Run the code above in your browser using DataLab